package com.shared.rule;



/**
 * Enumeration des 3 type de donnes complexes utilisé par {@link ComplexTriple}
 * @author queyroi
 * 
 */
public enum TypeComplexTriple {
	AND("AndTriple"),
	NOT("ComplementTriple"),
	OR("OrTriple");
	
	private String label;
	
	private TypeComplexTriple(String label) {
		this.label = label;
	}
	
	public String toString(){
		return label;
	}
	
	public static boolean isComplex(String label){
		if(AND.toString().equals(label) || NOT.toString().equals(label)  || OR.toString().equals(label) ) return true;
		return false;
	}
	
	public static TypeComplexTriple getType(String l){
		for(TypeComplexTriple type : TypeComplexTriple.values()) if(type.toString().equals(l)) return type;
		return null;
	}
	
}
